registerTests([
function ToDictionary_Test_0()
{
	var myArray = [{x: 2, y:"Timmy"}, {x: 6, y:"Johnny"}, {x: 1, y:"Bartholomew"}];

	var result = myArray.ToDictionary("x => x.y");
	Assert.areEqual(result["Timmy"], myArray[0]);
	Assert.areEqual(result["Johnny"], myArray[1]);
	Assert.areEqual(result["Bartholomew"], myArray[2]);
},
function ToDictionary_Test_1()
{
	var myArray = [{x: 2, y:"Timmy"}, {x: 6, y:"Johnny"}, {x: 1, y:"Bartholomew"}];

	var result = myArray.ToDictionary("x => x.y", "x => x.x");
	Assert.areEqual(result["Timmy"], 2);
	Assert.areEqual(result["Johnny"], 6);
	Assert.areEqual(result["Bartholomew"], 1);
},
]);